1. Field of the Invention
The present invention relates to a method and apparatus for controlling an amount of buffer data in a receiver of a data communication system, and a method and apparatus for playing back streaming data stored in a buffer, using an adaptive clock synchronization unit, and more particularly, to a streaming data playback method and apparatus with an adaptive clock synchronization function.
2. Description of the Related Art
For many decades, images and audio sound have been transmitted as analog signals. Nowadays, however, most videos are expressed and recorded as digital signals owing to several advantages. Digital signals of images and audio sound are transmitted through satellite broadcasting, terrestrial broadcasting or cable broadcasting, and users enjoy such digitalized images and audio sound using a set top box and a digital television.
Meanwhile, as internet technologies have been developed, the market for video-on-demand (VOD) services such as Internet-theater and Internet-music appreciation centers is expanding. Users can enjoy movies and music in real-time using a computer while VOD service providers are transmitting the movies and music in a format of streaming data over the Internet.
Digital televisions and VOD services are common in an aspect that users can enjoy images and music using streaming data transmitted over the Internet or a wireless transmission system.
FIG. 1 is a functional block diagram of a conventional streaming data transmission and receiving system.
The conventional streaming data transmission and receiving system of FIG. 1 comprises a streaming data transmitter 10 for transmitting streaming data and a streaming data receiver 20 for receiving and processing streaming data transmitted through a transmission medium. In this application, the term “streaming data” means data, images and audio sound, transmitted in real-time.
The streaming data transmitter 10 includes a streaming data generation unit 12 for generating streaming data, and a streaming data transmission unit 14 for transmitting the generated streaming data. The streaming data generation unit 12 encodes motion pictures and audio sound according to a Motion Picture Expert Group 2 (MPEG-2) compression algorithm. The encoded streaming data are transmitted through a transmission medium via a streaming data transmission unit 14.
The streaming data receiver 20 receives the transmitted streaming data and decodes the streaming data into motion pictures and audio sound. The streaming data receiver 20 comprises a streaming data receiving unit 22 for receiving the streaming data transmitted in real-time through a transmission medium, a buffer 24 for temporarily storing the received streaming data, a clock synchronization unit 26 for generating a clock synchronized with a playback time of the streaming data, and a playback unit 28 for decoding the streaming data and playing back the decoded data in synchronization with the clock.
The transmission media may include wire media as well as wireless media. For both wire and wireless media, the data transmission rate increases or decreases based on the total amount of data being transmitted through the media, the total amount of data being varied since the media are shared by a plurality of data communication systems. Particularly, in the case of using wireless media, data can be lost or damaged by noise while being transmitted. The receiving unit 22 of the receiver 20 neglects the lost or damaged part of data or requests the transmitter 10 to retransmit the lost or damaged data. In the case of neglecting the lost or damaged part of data, User Datagram Protocol (UDP) or Real-time Transport Protocol (RTP) which is an upper layer of the UDP is used. In the case of requesting the transmitter 10 to retransmit the lost or damaged data, Transmission Control Protocol (TCP) is used. Generally, streaming data transmission and receiving systems use the UDP or RTP.
If a data transmission is delayed due to data damage or data resubmission, or the data transmission rate decreases due to data congestion on the transmission media shared by many data communication systems, screen breaking can be caused in the receiver 20. Accordingly, the buffer 24 is needed to avoid screen breaking. The receiver 20 first stores a predetermined amount of data in the buffer and then starts to play back streaming data in real-time. By storing the streaming data before playing back the data, screen breaking can be avoided even if there is a data loss across transmission media, which often requires re-transmission, or transmission delay due to changes in transmission conditions.
Even though the buffer can prevent screen breaking that would be caused by transmission delay or reserve leeway of data retransmission time, further problems may arise. That is, for real-time playback of streaming data, an initial delay time for filling a buffer with streaming data is needed and such delay time can frustrate a user when the user wants to enjoy motion pictures or music in real-time. Particularly, when a user retrieves a specific scene in a movie, the user can see the retrieved scene only after all the pictures of the movie have been buffered. Further, the user can retrieve another scene only after deleting existing buffered data in the buffer and newly buffering streaming data. This makes a user even more frustrated. Further, the data transmission rate may be unavoidably decreased while a user watches a movie using the streaming data due to certain conditions of transmission media. In such a case, if the amount of data stored in the buffer falls below a predetermined level, a streaming data player temporarily stops the movie and replays it after filling the buffer with data to a predetermined amount.
To reduce an initial buffering time, which is a time period needed for buffering a minimum limit of data amount to start playing streaming data, or to maintain the amount of data stored in a buffer at a predetermined level, a clock control method which increases or decreases clock frequencies has been used. Japanese Patent Application Laid-Open Publication No. 1999-112982 discloses an exemplary method of reducing screen breaking events caused due to underflow or overflow of a buffer, which calculates the average amount of data in a buffer and controls a clock when the average amount is not within an allowed range. U.S. Patent Published Application No. 2003-0002609 discloses a method of controlling a clock for a receiver, which uses a feed-back loop and compares a predicted amount of data to be received from a transmitter and an actual amount of data in a decoder buffer. Further, methods for reducing underflow or overflow events by controlling clock frequencies are disclosed in U.S. Pat. Nos. 6,456,702 and 5,473,385 and Korean Patent Published Application No. 2002-0020955.
The methods disclosed in the above-stated patents and/or patent applications compensate for a clock frequency by comparing the amount of data stored in a buffer of a receiver and a reference amount of data. That is to say, in regard to the conventional methods, environmental factors affecting streaming data receivers are scarcely taken into consideration, which will briefly be explained by way of example. When a user searches a movie several times to get a certain scene from the movie, a shorter initial buffering time is preferred. When the transmission conditions are stable, it is not necessary to perform clock frequency control. However, the conventional methods do not consider such operation conditions of receivers. Accordingly, there is a need for methods and apparatuses for adaptively controlling the amount of buffer data in a buffer according to conditions of the environment under which a streaming data receiver operates.